Apache ActiveMQ

What is Apache ActiveMQ?

Apache ActiveMQ is a popular open source, multi-protocol, Java-based message broker. It supports industry standard protocols allowing users to connect from clients written in JavaScript, C, C++, Python, .NET, and other languages. Apache ActiveMQ is written in Java together with a full Java Message Service (JMS) client.

If you are unfamiliar with message queues and brokers, you may like to start by reading this overview, see: What is a Message Queue? - IT Glossary | eG Innovations.

As an open-source project, ActiveMQ is maintained and governed by the Apache Software Foundation (ASF). The Apache ActiveMQ community consists of developers and contributors from various organizations and individuals who collaborate on the development, enhancement, and support of the ActiveMQ messaging broker.

There are currently two varieties of ActiveMQ available - the established "classic" broker and a "next generation" broker named “Artemis”. Apache stated that when Artemis reaches enough feature parity with the "Classic" codebase, it will become the next major version of ActiveMQ. Initial migration documentation is available as well as a development roadmap for Artemis.

Apache ActiveMQ Classic is a message broker which supports multiple wire level protocols for maximum interoperability, including:

  • AMQP
  • AUTO
  • MQTT
  • OpenWire
  • REST
  • RSS and Atom
  • Stomp
  • WSIF
  • WS Notification
  • XMPP

Apache Artemis offers some features beyond the “classic” broker such as, high availability using shared storage or network replication (rather than just shared storage as per classic), asynchronous mirroring for disaster recovery and a few other features around clustering and persistence designed with modern distributed architectures in mind.


What is the difference between Apache Kafka and Apache ActiveMQ?

Apache Kafka and ActiveMQ are messaging systems, but with distinct architectures and use cases. Kafka is a distributed streaming platform built for high-throughput, fault-tolerant storage, and processing of streaming data. It follows a publish-subscribe model and is ideal for real-time stream processing, log aggregation, and data integration. Kafka is fundamentally a distributed event streaming platform designed to ingest and process massive amounts of data.

ActiveMQ, however, is a traditional message broker implementing the JMS API. It supports various messaging patterns including point-to-point and publish-subscribe, focusing on reliability and compliance with messaging standards. ActiveMQ is commonly used in enterprise scenarios requiring guaranteed delivery and transaction support, such as order processing and application integration. While Kafka excels in scalability and real-time processing, ActiveMQ prioritizes reliability and standards compliance for traditional messaging needs. The choice between the two depends on the specific requirements of the application.


What metrics should you monitor for ActiveMQ?

Key metrics and statistics related to the performance of a ActiveMQ Server should allow administrators to find accurate answers for the following performance queries:

  • Is the ActiveMQ Server running? Is the broker process up and responsive?
  • Are the brokers able to handle current load?
  • What is the average size of messages published?
  • How many connections out of total allowed connections are currently active?
  • Is any queue/topic a Dead Letter Queue (DLQ)?
  • Are new clients able to connect to the server successfully?
  • Is the broker able to store the messages without filling up the disk storage?
  • Are there any queues or topics with large backlogs or slow consumers?
  • Are there any warning alerts currently which need to be looked at?
  • Is there a need to add more capacity to the server?
  • Is there sufficient memory available for smooth operation? 

Beyond ActiveMQ metrics, logs, traces and events you will also want to monitor the supporting stack and the infrastructure / cloud you run it upon.

eG Enterprise layer model covers ActiveMQ and all its underlying dependencies such as JVM, Networking, OS and more.

Application transaction tracing and topology views within eG Enterprise provide deep insights and automated root-cause diagnostics to eliminate bottlenecks caused by ActiveMQ within complex architectures.


What tools are available for monitoring and managing ActiveMQ instances?

There are several tools available for monitoring and managing ActiveMQ instances, providing administrators with insights into the health, performance, and activity of their messaging infrastructure. Some popular tools include:

These options often give rather limited visibility, covering only some of the dependencies of an application built using ActiveMQ. As a result, most enterprise users rely on third-party out-of-the-box solutions such as Datadog, New Relic, Dynatrace and eG Enterprise which offer key features such as Distributed Transaction Tracing. The licensing costs of these options varies considerably and for many use cases eG Enterprise is the lowest cost option, see: How eG Enterprise IT Monitoring Licensing is Cost-Effective and Flexible | eG Innovations